<div>
    <div class="table-header mt5 clearfix ng-scope search">
        <span class="fl lh30 f14 mr25">认筹订单管理</span>
        <input class="input-text fl ng-pristine ng-untouched ng-valid" style="width: 470px;" type="text"
               placeholder="请输入认筹人姓名、手机号或身份证号码搜索" ng-model="filter.keyword" ng-enter="filter.apply()"/>
        <a class="btn" href="javascript: void(0)" ng-click="filter.apply()">搜索</a>
    </div>
    <div class="checkbox-wrap lh30 mt10 mb5 clearfix ng-scope">
        <span class="broker-text ng-binding">楼盘名称:</span>
        <div class="pb5" style="width:200px;">
            <div ui-project data="baseData.projectList"
                 ng-change="projectChanged()" ng-model="baseData.projectId"
                    ></div>
        </div>
    </div>
    <my-nav data-nav-items="filterDataStatus" onchanged="changeStatus" data-title="认筹单状态:"></my-nav>
    <my-nav data-nav-items="filterDataPeriod" onchanged="changePeriod" data-title="查询周期:"></my-nav>

    <div class="table-header mt20 clearfix ng-scope">
        <span class="fl lh30 f14">认筹订单列表</span>
    </div>

    <div id="grid" class="table-wrap mt10">
        <table width="100%" class="valign-t" style="line-height: 180%!important;">
            <thead>
            <tr>
                <th width="35">序号</th>
                <th width="300">认筹订单</th>
                <th width="220">认筹人信息</th>
                <th>认筹单状态</th>
                <th width="120" class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in ordersSvr.orders"
                ng-mouseover="record.hover = true"
                ng-mouseleave="record.hover = false">
                <td height="40"><p ng-bind="$index + 1 + ((filter.pageIndex-1)*filter.pageSize)"></p></td>
                <td class="lh14" valign="top">
                    <div style="padding: 10px 0;border: 1px dashed #ff7713;margin: 10px 0;min-height: 100px;line-height:180%">
                        <p style="border-bottom: 1px dashed #ff7713;padding:5px 10px 5px;">认筹单号:
                            {{record.order_code}}</p>

                        <p style="padding:5px 10px 0;">楼盘: {{record.building_name}}</p>

                        <p style="padding:5px 10px 0;">优惠信息: {{record.discount}}</p>

                        <p style="padding:5px 10px 0;">认筹金额: {{record.amount}}</p>
                    </div>

                </td>
                <td valign="top">
                    <div style="padding: 10px 0;border: 1px dashed #ff7713;margin: 10px 0;height: 110px;line-height:180%">
                        <p style="padding:5px 10px 0;">认筹人:{{record.purchaser_name}}</p>

                        <p style="padding:5px 10px 0;">手机号码:{{record.purchaser_mobile}}</p>

                        <p style="padding:5px 10px 0;">身份证号:{{record.purchaser_card_id}}</p>

                    </div>
                </td>
                <td>
                    <p>{{ record|formatStatus }}</p>

                    <p ng-if="record.status==2">解筹时间:{{record.settlement_on|strdate}}</p>

                    <p ng-if="record.status>0">付款时间:{{record.pay_on|strdate}}</p>
                    <p ng-if="record.sub_status==1">过期时间:{{record.end_date|strdate}}</p>
                    <p ng-if="record.sub_status==2">取消时间:{{record.modified_on|strdate}}</p>
                    <p>创建时间:{{record.created_on|strdate}}</p>
                </td>

                <td>
                    <a href="javascript:void(0)"
                       title="解筹"
                       ui-dialog="解筹"
                       ui-dialog-data="baseData"
                       ui-dialog-show="ordersSvr.initEditOrderDialog($data, $dialog,$dialogScope, record)"
                       ui-dialog-ok="ordersSvr.save($data, $dialog)"
                       ui-dialog-cache="false"
                       ui-dialog-url="orders/raise_fund_apply.html"
                       class="mt5 c-orange ng-hide clearfix permission p-50040402-04-inline" ng-show="record.hover||true"
                       ng-if="record.status==1 && record.sub_status != 1 && record.sub_status != 2"
                            >解筹</a>
                    <a href="javascript:void(0)"
                       title="查看解筹结果"
                       ui-dialog="查看解筹结果"
                       ui-dialog-data="baseData"
                       ui-dialog-show="ordersSvr.initEditOrderDialog($data, $dialog,$dialogScope, record)"
                       ui-dialog-ok=""
                       ui-dialog-cache="false"
                       ui-dialog-url="orders/raise_fund_apply.html"
                       class="mt5 c-orange ng-hide clearfix" ng-show="record.hover||true"
                       ng-if="record.status==2 && record.sub_status != 1 && record.sub_status != 2"
                            >查看解筹结果</a>

                    <a href="javascript:void(0)"
                       title="打印条款"
                       ui-dialog="打印条款"
                       ui-dialog-data="record"
                       ui-dialog-show="ordersSvr.initPrintDialog($data, $dialog,$dialogScope, record)"
                       ui-dialog-ok="ordersSvr.printClause($data)"
                       ui-dialog-ok-value="打印"
                       ui-dialog-cache="false"
                       ui-dialog-url="orders/print_clause.html"
                       class="mt5 c-orange ng-hide clearfix permission p-50040402-05-inline" ng-show="record.hover||true"
                       ng-if="record.status > 0 && record.sub_status != 1 && record.sub_status != 2"
                            >打印条款</a>
                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" style="display:none"><span>暂无数据</span></div>
    </div>
    <div ui-pagination page-index="filter.pageIndex" page-size="filter.pageSize" total="ordersSvr.total"
         changed="filter.goto($pageIndex)"></div>
</div>
